#ifndef __DRV_WIFI_H_
#define __DRV_WIFI_H_

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>

#include "data_fifo.h"

#define DRV_HANDSHAKE_PORT GPIOA
#define DRV_HANDSHAKE_PIN GPIO_Pin_4

enum slm_at_cmd
{
	CMD_WRITE_REQUEST = 1,
	CMD_READ_STATUS_REQUEST,
	CMD_WIRTE_DATA,
	CMD_READ_DATA,
};

enum slm_at_status
{
	CMD_STATUS_NONE = 0,
	CMD_STATUS_READ,
	CMD_STATUS_WRITE,
};

typedef struct
{
	uint16_t dummy;
	uint8_t status;
	uint8_t seq;
	uint16_t len;
} __attribute__((packed)) read_status_t;

int drv_wifi_init(void);
int drv_wifi_process(void);

int drv_wifi_spi_buff_write(uint8_t *data, uint16_t length);

void notify_slave_to_recv(void);

#endif
